list_x = [1, 0, 0, 4, 0, 6, 0, 8]

r = filter(lambda x: x != 0, list_x)
print(list(r))
